{
	template:`
	<a-page-header title="编辑" sub-title="鉴权信息">
		<template #extra>
			<a-button type="primary" @click="save();">保存</a-button>
			<m-back @click="back(false);">关闭</m-back>
		</template>
		<a-card :hoverable="true" :bodyStyle="{padding:'20px'}">
			<a-form class="index-form" :wrapper-col="{span:24}">
				<a-row :gutter="10">
					<a-col :span="8">
						<a-form-item label="名称" class="index-form-item">
                            <a-input v-model:value="model.name" placeholder="请输入名称"/>
						</a-form-item>
					</a-col>
					<a-col :span="16">
						<a-form-item label="描述" class="index-form-item">
							<a-input v-model:value="model.description" placeholder="请输入描述"/>
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="鉴权id" class="index-form-item">
                            <a-input v-model:value="model.authId" placeholder="请输入鉴权id"/>
						</a-form-item>
					</a-col>
					<a-col :span="16">
						<a-form-item label="鉴权key" class="index-form-item">
                            <a-input v-model:value="model.authKey" placeholder="请输入鉴权key"/>
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="鉴权误差" class="index-form-item">
							<a-select :options="dictOptions('api.model.ApiAuthinfo!authTime')" v-model:value="model.authTime" placeholder="请选择鉴权误差" show-search :filter-option="selectFilter" />
                        </a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="登录人" class="index-form-item">
							<a-select :options="dictOptions('manage.model.AdminLogin')" v-model:value="model.admin.oid" placeholder="请选择登录人" show-search :filter-option="selectFilter" />
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="登录机构" class="index-form-item">
						    <a-tree-select :tree-data="dictTreeOptions('manage.model.AdminGroup:C;;')" v-model:value="model.org.oid" placeholder="请选择登录机构" show-arrow show-search :filterTreeNode="treeSelectFilter"/>
						</a-form-item>
					</a-col>
					<a-col :span="8">
						<a-form-item label="类型" class="index-form-item">
							<a-radio-group :options="dictOptions('api.model.ApiAuthinfo!type')" v-model:value="model.type" />
						</a-form-item>
					</a-col>
					<a-col :span="16">
					    <a-alert message="接口适用于自定义或者指定接口的调用。" style="margin-top:-4px;"></a-alert>
					</a-col>
					<a-col :span="24">
					    <a-alert message="使用鉴权：在请求是head添加Authorization" description="设置成：(标识:auth)空格authid空格timelong空格to32Md5(timelong+authid+authkey)"></a-alert>
					</a-col>
				</a-row>
			</a-form>
		</a-card>
	</a-page-header>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
		    model:{admin:{},org:{}},

		};
	},
	mounted(){
	    this.model=this.param.model;
	},
	methods:{
		save:function(){
			this.requestData('action/api/apiAuthinfo/doSave',
				{model:this.model},
				data=>{
					if(data.code==0){
						this.$message.success(data.msg);
						this.model=data.model;
						this.back(true);
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		}
	}
}